//
//  CHMenuController.swift
//  CHSimpleUI
//
//  Created by cyptt on 2022/7/15.
//

import UIKit

class CHMenuController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        
        
    }


    @IBAction func defaultBtn(_ sender: UIButton) {
        
        print("点击了")
        
        print("点击了")
        
        var dataArr:[CHSheetModel] = []
        for item in 0...10 {
         
            
            let selmodel:CHSheetModel = CHSheetModel.init()
            selmodel.titleName = String(item)
            selmodel.idStr = String(item)
            selmodel.expand1 = String(item)
            selmodel.leftImage = UIImage.init(named: "check_box_selected1")
            selmodel.rSelectedImage = UIImage.init(named: "arrow_down_icon")
            dataArr.append(selmodel)
        }
        let bottomSelectView:CHSheetView = CHSheetView()
        bottomSelectView.show(title: "title",contentTitles: dataArr,showMaxRow: 10,position: .bottom)
        bottomSelectView.setSureCallBack { resultModel in
            print(resultModel)
        }
        bottomSelectView.setChaImage(image: UIImage.init(named: "check_box_selected1"))
 
        bottomSelectView.setCancleCallBack { msg in
            print(msg)
        }
        bottomSelectView.setTitlePosition(position: .right)
        bottomSelectView.setCancelPosition(position: .center)
        bottomSelectView.setCancelFont(font: UIFont.systemFont(ofSize: 14))
    }
    

}
